<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="ee.graphicscard.model.dto.GraphicsCard"%>    
 
<jsp:useBean id="arrayOfGraphicsCards" scope="request" type="ee.graphicscard.model.dto.GraphicsCard[]" /> 
   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Graafikakaartide nimekiri</title>
		<link rel="stylesheet" type="text/css" href = "static/css/vaheylesande_stylesheet.css"/>
		<script type="text/javascript" src="jquery-1.9.1.js"></script>
		<script type="text/javascript" src="static/js/jsForGraphicsCardWebPages.js"></script>
	</head>
	<body>
		
		<%@ include file="/ContainerAndMenu.jsp" %>
<!-- _____________________________CONTENT____________________________________________________________________________ -->
    	<div class="column" id="content">
			<h1>Graafikakaartide nimekiri:</h1>
				
			<br>
			<%	
				String graphicscard_id = "";
				String product_name = "";
				String cudacores = "";
				String overview = "";
			%>			
			<table bgcolor='#000000' border=0 cellpadding=0 cellspacing=0>
				<tr> 
					<td>
						<table width=100% border=0 cellpadding=2 cellspacing=1>
								<tr bgcolor='#cccccc'>
									<td>
										<strong>Identifikaator&nbsp;</strong>
									</td>
									<td>
										<strong>Toote&nbsp;nimi&nbsp;</strong>
									</td>
									<td>
										<strong>CUDA&nbsp;Cores&nbsp;arv&nbsp;</strong>
									</td>
									<td>
										<strong>......&nbsp;</strong>
									</td>
									<td>
										<strong>......&nbsp;</strong>
									</td> 
								</tr>
								<tr>
								</tr>
					
			<%
				try
				{
					for (int i = 0; i < arrayOfGraphicsCards.length ; i++)
					{
						graphicscard_id = Integer.toString(arrayOfGraphicsCards[i].getGraphicscard_id());
						product_name = arrayOfGraphicsCards[i].getProduct_name();
						cudacores = Integer.toString(arrayOfGraphicsCards[i].getCudacores()) ;
						overview = arrayOfGraphicsCards[i].getOverview();
			%>				
								<tr bgcolor='#FFFFFF'>
									<td nowrap>
										&nbsp; <%=graphicscard_id %>&nbsp;
									</td>
									<td>
										<%=product_name%>&nbsp;
									</td>
									<td>
										<%=cudacores%>&nbsp;
									</td>
									<td align='top' nowrap>
										<a href='javascript:loadGraphicsCardInfo(<%=graphicscard_id%>)' TARGET='_self'>
											<b><u>kirjeldus</u><b>
										</a>
									</td>
									<td align='top' nowrap>
										<a href='s?id=<%=graphicscard_id%>'><!-- enne oli parameetris ka korduvpäringu suunamine iseendale, mitte uuesti 
											servleti kätte, s.t.     TARGET='_self' -->
											<b><u>muuda</u><b>
										</a>
									</td>
								</tr>
			<%					
					}
				}
				catch (Exception ex)
				{
					out.println("Mingi viga" + ex.getMessage());
				}
			%>
			
						</table>
					</td>
				</tr>
			</table>
			<br/>
			<br/>
			<div id="ajaxDiv"></div>
    	</div>
<!-- _____________________________CONTENT END________________________________________________________________________ -->
		
		<%@ include file="/FooterAndEndOfContainer.jsp" %>
	</body>
</html>